# best arnor geri þetta, her er kodinn sem hann notadi i svipudu verkefni

# Grf að í einu ári séu 31*12 dagar

kennitala = input("Kennitala: ")
tala = int(kennitala[0] + kennitala[1]) + 31*(int(kennitala[2]+kennitala[3])-1)	# Hver dagur hefur einhverja tölu sem við getum kannað hvort sé á ákveðnu bili
stjornumerki = {0:'Steingeit', 21:'Vatnsberi', 20+31:'Fiskur', 21+31*2:'Hrútur', 21+31*3:'Naut', 22+31*4:'Tvíburi', 21+31*5:'Krabbi', 
				24+31*6:'Ljón', 24+31*7:'Meyja', 24+31*8:'Vog', 23+31*9:'Sporðdreki', 22+31*10:'Bogmaður', 22+31*11:'Steingeit'}
rettTala = 0
for x in stjornumerki.keys():
	if tala > x and rettTala < x:
		rettTala = x

print(stjornumerki[rettTala])


#her er svo brute force kodi fra mer


kennitala = input()
if int(kennitala[2] + kennitala[3]) == 1:
	if int(kennitala[0] + kennitala[1]) > 20:
		print ("Vatnsberi")
	else: print("Steingeit")
if int(kennitala[2] + kennitala[3]) == 2:
	if int(kennitala[0] + kennitala[1]) > 19:
		print("Fiskur")
	else: print("Vatnsberi")
if int(kennitala[2] + kennitala[3]) == 3:
	if int(kennitala[0] + kennitala[1]) > 20:
		print("Hrútur")
	else: print("Fiskur")
if int(kennitala[2] + kennitala[3]) == 4:
	if int(kennitala[0] + kennitala[1]) > 20:
		print("Naut")
	else: print("Hrútur")
if int(kennitala[2] + kennitala[3]) == 5:
	if int(kennitala[0] + kennitala[1]) > 21:
		print("Tvíburi")
	else: print("Naut")
if int(kennitala[2] + kennitala[3]) == 6:
	if int(kennitala[0] + kennitala[1]) > 20:
		print("Krabbi")
	else: print("Tvíburi")
if int(kennitala[2] + kennitala[3]) == 7:
	if int(kennitala[0] + kennitala[1]) > 23:
		print("Ljón")
	else: print("Krabbi")
if int(kennitala[2] + kennitala[3]) == 8:
	if int(kennitala[0] + kennitala[1]) > 23:
		print("Meyja")
	else: print("Ljón")
if int(kennitala[2] + kennitala[3]) == 9:
	if int(kennitala[0] + kennitala[1]) > 23:
		print("Vog")
	else: print("Meyja")
if int(kennitala[2] + kennitala[3]) == 10:
	if int(kennitala[0] + kennitala[1]) > 22:
		print("Sporðdreki")
	else: print("Vog")
if int(kennitala[2] + kennitala[3]) == 11:
	if int(kennitala[0] + kennitala[1]) > 21:
		print("Bogmaður")
	else: print("Sporðdreki")
if int(kennitala[2] + kennitala[3]) == 12:
	if int(kennitala[0] + kennitala[1]) > 21:
		print("Steingeit")
	else: print("Bogmaður")
		

